package com.michael;

import java.util.HashMap;
import java.util.Map;

/**
 * Created by Administrator on 2019/3/17 0017.
 */
public class Leader implements IEmployee {

    private static Map<String,IEmployee>  map = new HashMap<>();

    static{
        map.put("coding",new EmployeeA());
        map.put("document",new EmployeeB());
    }

    @Override
    public void doWork(String command) {
        map.get(command).doWork(command);
    }
}
